package edu.mis.modules.transaction;

import com.jfinal.core.Controller;
import edu.mis.model.Transaction;


public class TransactionController extends Controller{
    static TransactionService service = new TransactionService();
    public void index(){
        //加载该页面
        render("transaction.html");
    }

    /**
     * 显示所有交易记录
     */
    public void list(){
        setAttr("data", service.findAllTransaction());
        renderJson();
    }

    /**
     * 查看订单详情
     */
    public void detail(){
        setAttr("data", service.findAllOrderDetailsById((int)getParaToInt("id")));
        renderJson();
    }

}
